package io.github.talelin.latticy.mapper;

import io.github.talelin.latticy.bo.LocationByAreaVo;
import io.github.talelin.latticy.conf.MyBaseMapper;
import io.github.talelin.latticy.model.LocationDO;
import io.lettuce.core.dynamic.annotation.Param;

import java.util.List;

/**
 * <p>
 * 仓库 Mapper 接口
 * </p>
 *
 * @author generator@wulongbo
 * @since 2022-06-07
 */
public interface LocationMapper extends MyBaseMapper<LocationDO> {

    /**
     * 查询指定库位名为$name的数量
     *
     * @param id   分区id
     * @param name 库位名
     * @return 数量
     */
    int selectCountByIdAndName(@Param("id") int id, @Param("name") String name);

    /**
     * 根据库位id查询库位信息及分区信息
     * @param idsList
     * @return
     */
    List<LocationByAreaVo> getLocationByIdList(@Param("idsList") List<Integer> idsList);
}
